package com.amkai.aes.webservice.binary.objecthandler.diee;

import java.io.Serializable;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.amkai.aes.aescommon.service.diee.DataExportJob;
import com.amkai.aes.aescommon.service.diee.DataExportResult;
import com.amkai.aes.server.diee.DataExportProvider;
import com.amkai.aes.webservice.binary.JobObjectHandler;

public class DataExportHandler implements JobObjectHandler<DataExportJob, Serializable, DataExportResult> {
	private static final Log logger = LogFactory.getLog(DataExportHandler.class);
	
	public DataExportResult process(DataExportJob job, Serializable object) throws Exception {
		DataExportProvider mp = new DataExportProvider();
		try {
			return mp.processJob(job, object);
		} catch (Throwable e) {
			logger.error("DataExportHandler: ", e);
			throw new Exception(e);
		}
	}

}
